<%@ page import="domain.*" %>
<%@ page import="org.springframework.context.i18n.LocaleContextHolder" %>
<%@ page import="java.util.List" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";

%>
<%	if(request.getAttribute("employee")==null){
    Employee employee=new Employee();
    request.setAttribute("employee",employee);}%>
<html>
<body>
<h2>你好</h2>
<form:form action="employeeAction" method="post" modelAttribute="employee">
<div style="margin-left: 30px; margin-right: 0px">
<table width="90%" border="1" cellpadding="0" cellspacing="0">
    <tr>
        <td width="5%" class="td_title">选择</td>
        <td width="5%" class="td_title">修改</td>
        <td width="10%" class="td_title">员工编号</td>
        <td width="15%" class="td_title">员工名称</td>
        <td width="15%" class="td_title">出生年月日</td>
        <td width="8%" class="td_title">员工性别</td>
        <td width="19%" class="td_title">员工电话</td>
        <td width="15%" class="td_title">员工Email</td>
    </tr>
<%
    System.out.println(request.getAttribute("employees"));
    List<Employee> employees = (List) request.getAttribute("employees");
    if (employees != null && employees.size() > 0) {
        for (Employee employee : employees) {%>
<tr>
    <td class="td_border">待定</td>
    <td class="td_border">待定</td>
    <td class="td_border"><%=employee.getCode() %>
    </td>
    <td class="td_border"><%=employee.getName() %>
    </td>
    <td class="td_border"><%=employee.getBirthday() %>
    </td>
    <td class="td_border"><%=employee.isSex() ? "男" : "女" %>
    </td>
    <td class="td_border"><%=employee.getTelephone() %>
    </td>
    <td class="td_border"><%=employee.getEmail() %>
    </td>
</tr>
<% }
}%>
</table>
</div>
</form:form>
</body>
</html>
